/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.app.service.express;

import com.shop.cereshop.commons.domain.express.ShippingTrace;
import com.shop.cereshop.commons.domain.kuaidi.kd100.order.req.PlaceAnOrderByCReq;
import com.shop.cereshop.commons.domain.kuaidi.kd100.order.resp.Kd100BaseResp;
import com.shop.cereshop.commons.domain.kuaidi.kd100.order.resp.PlaceAnOrderByCResp;
import com.shop.cereshop.commons.exception.CoBusinessException;

import java.util.List;
import java.util.Map;

/**
 * 快递100 相关操作
 *
 * @author wangsong
 * @version 1.0.0
 * @mail 1720696548@qq.com
 * @date 2020/9/16 0016 10:26
 */
public interface KuaiDi100Service {

    /**
     * 查询物流轨迹（文字轨迹不包含地图轨迹）
     *
     * @param code   快递公司编号
     * @param formid 快递单号
     * @return
     * @throws CoBusinessException
     * @throws Exception
     */
    List<ShippingTrace> findTraces(String code, String formid) throws CoBusinessException, Exception;

    /**
     * C端寄件API应用场景
     * 1、平台需接入寄件服务，付费方式为寄件人付费的场景；
     * 2、不支持做预充值的客户，线下向快递员支付快递费用。
     * 客户下单自行寄回快递
     */
    Kd100BaseResp<PlaceAnOrderByCResp> placeAnOrderByC(PlaceAnOrderByCReq req) throws CoBusinessException;
    /**
     * C端寄件下单取消接口
     * 对下完的单进行取消操作
     */
    Kd100BaseResp<PlaceAnOrderByCResp> cancelOrderByC(PlaceAnOrderByCResp req) throws CoBusinessException;

    /**
     * C端寄件价格查询接口
     * 查看从出发地到目的地的价格
     */
    Kd100BaseResp<Map<String, String>> queryPriceByC(PlaceAnOrderByCReq req) throws CoBusinessException;


}
